<?php
require_once "../config/app.config.php";
$entity = new EntityBLL();
if($_POST['node'] == 0){
	$entitiesJSON = $entity->GetAllAsJSON(false);
}else{
	$entitiesJSON = $entity->GetFieldsAsJSON($_POST["node"]);
}
print $entitiesJSON;
?>